package com.joint.web.action.main;
import com.joint.base.entity.FileManage;
import com.joint.base.entity.Users;
import com.joint.base.service.AdminService;
import com.joint.base.service.FileManageService;
import com.joint.base.service.UsersService;
import com.joint.web.action.BaseAdminAction;
import org.apache.struts2.convention.annotation.ParentPackage;

import javax.annotation.Resource;
import java.io.File;
import java.math.BigDecimal;
import java.util.List;

/**
 * 后台Action类 - 网站注册 - 登录注册
 * ============================================================================
 * 版权所有 2013 min_xu。
 * ----------------------------------------------------------------------------
 * 
 * @author min_xu
 * 
 * @version 0.1 2013-7-15
 */

@ParentPackage("main")
public class LoginAction extends BaseAdminAction {
	private static final long serialVersionUID = -5383463207248344967L;
	
	private String loginname;
	private String loginmobile;
	private String mobilecode;
	private String referrerMobile;
	
	private String username;
	private String password;
	private String password2;
	private String __code;
	
	private String _t;	//进入类型
	private String _message;	//返回消息

	private long attentionNumber;
	private long commentsNumber;
	
	//查询地址
	private String city;
	private String address;
	private String lat;
	private String lng;
	//充值信息
	private BigDecimal chargeMoney;
	private String paySelect;
	private String sHtmlText;
	private int payReturn;
	private List<Users> listUsers;

	
	private String bankNo;
	private String bankName;
	private String name;
    private Users users;
	//
	private File head;
	private String headFileName;
	private FileManage fileManage;
	
	@Resource
	private UsersService usersService;
	@Resource
	private AdminService adminService;
	@Resource
	private FileManageService fileManageService;
	
	public String execute(){
		if(getSession("adminUsername")==null){
			loginname = "";
			
		}else{
			loginname = (String) getSession("adminUsername");
			//已经登录，跳过登录页面
			return "adminindex";
		}
		return "adminlogin";
	}
	
	public String getLoginname() {
		return loginname;
	}
	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}
	public String getLoginmobile() {
		return loginmobile;
	}
	public void setLoginmobile(String loginmobile) {
		this.loginmobile = loginmobile;
	}
	public String getMobilecode() {
		return mobilecode;
	}
	public void setMobilecode(String mobilecode) {
		this.mobilecode = mobilecode;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getPassword2() {
		return password2;
	}
	public void setPassword2(String password2) {
		this.password2 = password2;
	}
	public String get__code() {
		return __code;
	}
	public void set__code(String __code) {
		this.__code = __code;
	}
	public String get_t() {
		return _t;
	}
	public void set_t(String _t) {
		this._t = _t;
	}
	public String get_message() {
		return _message;
	}
	public void set_message(String _message) {
		this._message = _message;
	}
	public Users getUsers() {
		return users;
	}
	public void setUsers(Users users) {
		this.users = users;
	}
	public File getHead() {
		return head;
	}
	public void setHead(File head) {
		this.head = head;
	}
	public String getHeadFileName() {
		return headFileName;
	}
	public void setHeadFileName(String headFileName) {
		this.headFileName = headFileName;
	}

	public long getAttentionNumber() {
		return attentionNumber;
	}
	public void setAttentionNumber(long attentionNumber) {
		this.attentionNumber = attentionNumber;
	}
	public long getCommentsNumber() {
		return commentsNumber;
	}
	public void setCommentsNumber(long commentsNumber) {
		this.commentsNumber = commentsNumber;
	}
	public List<Users> getListUsers() {
		return listUsers;
	}
	public void setListUsers(List<Users> listUsers) {
		this.listUsers = listUsers;
	}
	
	public String getReferrerMobile() {
		return referrerMobile;
	}
	public void setReferrerMobile(String referrerMobile) {
		this.referrerMobile = referrerMobile;
	}
	
	public BigDecimal getChargeMoney() {
		return chargeMoney;
	}
	public void setChargeMoney(BigDecimal chargeMoney) {
		this.chargeMoney = chargeMoney;
	}
	public String getPaySelect() {
		return paySelect;
	}
	public void setPaySelect(String paySelect) {
		this.paySelect = paySelect;
	}
	public String getSHtmlText() {
		return sHtmlText;
	}
	public void setSHtmlText(String htmlText) {
		sHtmlText = htmlText;
	}
	public int getPayReturn() {
		return payReturn;
	}
	public void setPayReturn(int payReturn) {
		this.payReturn = payReturn;
	}
	
	public String getBankNo() {
		return bankNo;
	}
	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}
	public String getBankName() {
		return bankName;
	}
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getLat() {
		return lat;
	}
	public void setLat(String lat) {
		this.lat = lat;
	}
	public String getLng() {
		return lng;
	}
	public void setLng(String lng) {
		this.lng = lng;
	}
	
}